import matplotlib.pyplot as plt
from next_level.Finance_Data.make_plot import makeplot
from next_level.Finance_Data.stock_load import load_stock

'''
绘制股票的每日高点和低点
依赖模块 stock_load.py
'''

def do_highlow_plot(stock_df,name_str):
    '''绘制股票的每日高点和低点
    使用一支股票的 High 和 Low 列，这些包含在数据框 stock_df 中
    '''
    makeplot(stock_df,'High','daily highs')
    makeplot(stock_df, 'Low','daily lows')

    plt.title('High/Low Prices for ' + name_str)
    plt.show()


if __name__ == '__main__':
    stock_df = load_stock('MSFT')
    do_highlow_plot(stock_df,'MSFT')


